﻿using JLPT.Models.Objects;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Web;

namespace JLPT.Models.FluentConfiguration
{
    public class QuizHistoryConfiguration : EntityTypeConfiguration<QuizHistory>
    {
        public QuizHistoryConfiguration()
        {
            Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            //Property(t => t.CreatedDate)
            // .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Computed);
            Property(d => d.CreatedDate).IsOptional();
            Property(p => p.CreatedDate).HasColumnType("datetime2");
            Property(d => d.UpdatedDate).IsOptional();
            Property(p => p.UpdatedDate).HasColumnType("datetime2");
            
        }
    }
}